def isPowerOfTwo(self, n: int) -> bool:
    if n == 0: return False
    return (n & (-n)) == n

def isPowerOfTwo(self, n: int) -> bool:
    if n == 0: return False
    return (n & (n - 1)) == 0